<template>
  <view class="themeItem">
    <navigator class="box" url="" v-if="!isMore">
      <image
        class="pic"
        src="../common/images/classify1.jpg"
        mode="ascaleToFill"
      />
      <view class="mask">明星美女</view>
      <view class="tab">3天前更新</view>
    </navigator>
    <navigator class="box more" url="" v-if="isMore">
      <image class="pic" src="../common/images/more.jpg" mode="ascaleToFill" />
      <view class="mask">
        <uni-icons type="more-filled" size="34" color="#fff"></uni-icons>
        <view class="text">更多</view>
      </view>
    </navigator>
  </view>
</template>

<script lang="ts" setup>
defineProps({
  isMore: {
    type: Boolean,
    default: false,
  },
});
</script>
<style lang="scss" scoped>
.themeItem {
  .box {
    height: 340rpx;
    border-radius: 10rpx;
    overflow: hidden;
    position: relative;
    .mask {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 70rpx;
      background: rgba($color: #000000, $alpha: 0.2); //半透明
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      backdrop-filter: blur(20rpx); //毛玻璃效果
      font-weight: 600;
      font-size: 30rpx;
    }
    .tab {
      position: absolute;
      top: 0;
      left: 0;
      background: rgba(250, 129, 90, 0.7); //半透明
      backdrop-filter: blur(20rpx); //毛玻璃效果
      color: #fff;
      font-size: 22rpx;
      padding: 6rpx 14rpx;
      border-radius: 0 0 20rpx 0;
      transform: scale(0.8); //缩放
      transform-origin: left top; //缩放原点
    }
    .pic {
      width: 100%;
      height: 100%;
    }
  }
  .box.more {
    .mask {
      width: 100%;
      height: 100%;
      flex-direction: column;
    }
    .text {
      font-size: 28rpx;
    }
  }
}
</style>
